import request from '@/utils/request'

/*    bidco | ctrlbid | ctrl | sub   */
export function getLots (data) {
  return request({
    url: '/lot/getLots',
    method: 'get',
    params: data
  })
}

/*           sub          */
export function getAllLots () {
  return request({
    url: '/lot/getAllLots',
    method: 'get'
  })
}

export function setLot (data) {
  return request({
    url: '/lot/setLot',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    type: 'form'
  })
}

export function delLot (id) {
  return request({
    url: '/lot/delLot',
    method: 'post',
    data: { id }
  })
}

export function emptyLot (id) {
  return request({
    url: '/lot/emptyLot',
    method: 'post',
    data: { id }
  })
}
/*           sub  end        */

/*    ctrl    */
export function getLotData (id) {
  return request({
    url: '/lot/getLotData',
    method: 'get',
    params: { id }
  })
}

export function setLotState (data) {
  return request({
    url: '/lot/setLotState',
    method: 'post',
    data
  })
}

export function getAucingLots () {
  return request({
    url: '/lot/getAucingLots',
    method: 'get'
  })
}
/*         ctrl end          */
